//测量字符串长度的函数
#include<stdio.h>

long Mystrlen(char *s)
{
    int count = 0;
    while(*s != '\0')
    {
        count++;
        s++;
    }
    return count;
}

void main()
{
    char *s = "asasdas";
    
    char a[]= "12sd";
    
    printf("s一开始指向的字符串的长度 = %ld\n",Mystrlen
(s));
    
    printf(" 字符数组a的长度 = %ld\n",sizeof(a));
    
    s = a;
    
    printf("指针s指向的 字符数组 a 的字符串长度 = %ld\n",Mystrlen
(s));
    return ;
}